// This brings in the GUI part of the library so we can use it
import Vanilla.UI

// This defines a class called ImageViewerWindow, that is a subclass of MainWindow
class ImageViewerWindow (MainWindow):
	// The image gadget inside this window. Note that what is written as "int my_variable" in C/C#/.. is "my_variable as int" in Boo.
	public Image as ImageGadget

	// The constructor - sets up the ImageViewerWindow. f (which is a string) is the filename of the .png to open.
	def constructor (f as string):
		// This calls MainWindow's constructor, which takes the window's title as it's argument.
		// ${...} in a string means "place ... as a string inside this string", so if f was "poop", "blah${f}aaah" would become "blahpoopaaah"
		super("Image Viewer - ${f}")
		// Creates the ImageGadget inside. Self refers to this object, and the first argument to create most gadgets is the gadget you want
		// it created inside, so this will create the ImageGadget inside this window. The f, of course, tells ImageGadget what file to open.
		// Note that we don't have to write "new ImageGadget(self, f)" like in C#.
		Image = ImageGadget(self, f)

